import request from '@/utils/request'

// 查询散户验机列表
export function listScattered(query) {
  return request({
    url: '/recovery/scattered/list',
    method: 'get',
    params: query
  })
}

// 查询散户验机详细
export function getScattered(scatteredId) {
  return request({
    url: '/recovery/scattered/' + scatteredId,
    method: 'get'
  })
}

// 新增散户验机
export function addScattered(data) {
  return request({
    url: '/recovery/scattered',
    method: 'post',
    data: data
  })
}

// 修改散户验机
export function updateScattered(data) {
  return request({
    url: '/recovery/scattered',
    method: 'put',
    data: data
  })
}

// 删除散户验机
export function delScattered(scatteredId) {
  return request({
    url: '/recovery/scattered/' + scatteredId,
    method: 'delete'
  })
}

// 导出散户验机
export function exportScattered(query) {
  return request({
    url: '/recovery/scattered/export',
    method: 'get',
    params: query
  })
}

//确认回收
export function collectGoods(data) {
  return request({
    url: '/recovery/scattered/collect/goods',
    method: 'post',
    data: data
  })
}
